<?php
include_once("codelibrary/inc/variables.php");
include_once("session.php");
include_once("codelibrary/inc/functions.php");

$business_id = $_SESSION['business_id'];
$customer_id = $_REQUEST['customer_id'];

$getData=getAnyTableWhereData($customer_info_table," and customer_id=$customer_id");

$staff_id = $getData['staffassignedto'];

$getStaffData=getAnyTableWhereData($staff_table," and staff_id=$staff_id");

$fullname = $getStaffData['last_name'].","." ".$getStaffData['first_name'];

if(isset($_REQUEST['Submit']))
{
 
	header("Location: edit-customer.php?id=$customer_id&type=2");
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Online Appointment</title>
<script type="text/javascript" src="codelibrary/js/common.Js"></script>
<script language="JavaScript1.2" src="codelibrary/js/cal_change.js"></script>
<script type="text/javascript" src="calendarDateInput.js"></script>


<base >
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<title>Staff Management</title>

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">


<table cellpadding="0" cellspacing="0" border="0"><tr>
  <td style="background:url(images/top.gif) repeat-x top; ">
<table cellpadding="0" cellspacing="0" border="0" style="width:764px" align="center"> 
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" border="0" style="height:57">
				<tr>
					<td height="57">
<? html_header(); ?>					</td>
				</tr>
			</table>


		</td>
	</tr>
	<tr>
		<td>





<table border="0" width="105%" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" class="col_left">

<table border="0"cellspacing="0" cellpadding="0" class="box_width_left">
	<tr><td width="100%">
		<table border="0" cellspacing="0" cellpadding="0">
<tr><td>

<table border="0" width="100%" cellspacing="0" cellpadding="0" class="">
  <tr>
    <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="0"  class="" height="91">
  <tr>
    <td align="center" height="91">
    <img border="0" src="images/logo.jpg" width="208" height="86"></td>
  </tr>
</table>
</td>
  </tr>
</table>
</td></tr>


          <tr>
            <td>
<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="box_header_txt" height="48">
  <tr>
    <td style="background-image: url(images/1_bg2-2.gif)" height="1">
      <p style="margin-top: 16"> </td>
  </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"   style="border-bottom:12px solid #ffffff;">
  <tr>
    <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="0"  style="margin-bottom:0px;background:#7C7C7C url(images/1_line.gif) no-repeat left bottom;" >
  <tr>
    <td  style="padding:3px 16px 8px 25px;">
      <table width="100%" border="0">
                                            <tr>
                                              <td><a href="edit-customer.php?customer_id=<?=$customer_id;?>" class="topmenulink"><strong>Personal Information</strong></a></td>
                                            </tr>
                                            <tr>
                                              <td><a href="add-customer-notes.php?customer_id=<?=$customer_id;?>" class="topmenulink"><strong>Customer Notes </strong></a></td>
                                            </tr>
											<tr>
                                              <td><a href="appointment-history-details.php?customer_id=<?=$customer_id;?>" class="topmenulink"><strong>Appointment History </strong></a></td>
                                            </tr>
											<tr>
                                              <td><a href="make-appointment.php?customer_id=<?=$customer_id;?>" class="topmenulink"><strong>Make Appointments </strong></a></td>
                                            </tr>
                                          </table>
    </td>
  </tr>
</table>
</td>
  </tr>
</table>
            </td>
          </tr>


          <tr>
            <td class="">&nbsp;
</td>
          </tr>

		</table>
	</td>
	<td><img src="images/spacer.gif" border="0" alt="" width="15" height="1"></td></tr>
</table>

    </td>

    <td width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="cont_header_txt">
  <tr>
    <td>
			<table border="0" cellpadding="0" cellspacing="0" bgcolor="#EAEAEA" class="cont_header_txt">
				<tr>
					<td><img src="images/1_q1.gif" border="0" alt="" width="45" height="39"></td>
					<td style="width:100%">Create Personnel Record</td>
					<td><img src="images/1_q2.gif" border="0" alt="" width="10" height="39"></td>
				</tr>
			</table>										 
			</td>
  </tr>
</table>


						
						<table cellpadding="0" cellspacing="0" border="0" style="border:0px solid #DEDEDE; border-width:0px 1px 0px 1px;">
                          <tr>
                            <td style="background:#ffffff;border:0px solid #ffffff; border-width:18px 5px 10px 5px;"><!-- new_products //-->
                                <table border="0" width="" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td>
								<form name="frm" action="" method="post">
                                <table width="108%" border="1" cellpadding="3" cellspacing="2" bordercolor="#FFDBCA" class="table">
								<tr>
                                          
                                          <td align="center" class="errTxt" colspan="2">
										  <? 
										  if(isset($msg))
										  {
										  ?>
												Customer
												<?=$msg;?>
												Successfully.
										  <? 
										  }
										  ?>					
																
										
                                            &nbsp;</td>
                                          
                                        </tr>
                                  <tr>
                                    <td width="34%" height="27" valign="bottom" class="simpletxt">&nbsp;First Name </td>
                                    <td width="66%" height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['firstname'];?>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Last Name </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['lastname'];?>
                                    </td>
                                  </tr>
                                 <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Address </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['address'];?>
</textarea></td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;City </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['city'];?></td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;State </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['state'];?></td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt"><strong>&nbsp;</strong>Zip Code </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><? if($getData['zipcode']!=0){echo $getData['zipcode'];}?></td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Daytime Phone </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><? if($getData['dayphone']!=0){echo $getData['dayphone'];}?>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Evening Phone </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><? if($getData['eveningphone']!=0){echo $getData['eveningphone'];}?>
                                    </td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Cell Phone </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><? if($getData['cellphone']!=0){echo $getData['cellphone'];}?>
                                    </td>
                                  </tr>
								   <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;E-mail </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['email'];?>
                                    </td>
                                  </tr>
								  <tr>
									<td height="27" valign="bottom" class="simpletxt">&nbsp;Login </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=$getData['username'];?>
									</td>
							      </tr>
								   <tr>
									<td height="27" valign="bottom" class="simpletxt"  >&nbsp;Password </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=$getData['password'];?>
									</td>
								   </tr>
								   
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Heard Via ? </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['leadtype'];?>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt" nowrap="nowrap">&nbsp;Contact Okay </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="simpletxt"><label>
                                      <?=$getData['contactokay'];?></label>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt" nowrap="nowrap">&nbsp;Call Okay </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="simpletxt"><label>
                                      <?=$getData['callokay'];?></label>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt" nowrap="nowrap">&nbsp;E-mail Okay </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="simpletxt"><label>
                                      <?=$getData['emailokay'];?></label>
                                    </td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt" nowrap="nowrap">&nbsp;Mail Okay </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="simpletxt"><label>
                                      <?=$getData['mailokay'];?></label>
                                    </td>
                                  </tr>
                                  
                                 <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Payment Method </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['paymentmethod'];?>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Credit Card Number </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><? if($getData['ccn']!=0){echo $getData['ccn'];}?></td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Exp. Month </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><? if($getData['expiredmonth']!=0){echo $getData['expiredmonth'];}?>
                                    </td>
                                  </tr> 
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Exp. Year </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><? if($getData['expiredyear']!=0){echo $getData['expiredyear'];}?>
                                    </td>
                                  </tr> 
								  <tr>
									<td height="27" valign="bottom" class="simpletxt"  >&nbsp;Card Code </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<? if($getData['cardcode']!=0){echo $getData['cardcode'];}?>
									</td>
							      </tr>
								   <tr>
									<td height="27" valign="bottom" class="simpletxt"  >&nbsp;Name On Card </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=$getData['cardname'];?>
									</td>
								   </tr>
								  <tr>
									<td height="27" valign="bottom" class="simpletxt"  >&nbsp;Company </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=$getData['companyname'];?>        
									</td>
							      </tr>
								   <tr>
									<td height="27" valign="bottom" class="simpletxt"  >&nbsp;Occupation </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=$getData['occupation'];?>
									</td>
								   </tr>
								   <tr>
									<td height="27" valign="bottom" class="simpletxt"  >&nbsp;Birth Date </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=nl2br(show_formatted_date($getData['birthdate']));?>
									</td>
								   </tr>
                                  
                                  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Gender </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="simpletxt"><label>
                                      <?=$getData['gender'];?>
                                    </label></td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Status </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['status'];?>
                                    </td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt" nowrap="nowrap">&nbsp;Allowed To Log-In </td>
                                    <td height="27" colspan="2" valign="bottom" nowrap class="simpletxt"><label>
                                     <?=$getData['loginallowed'];?></label>
                                    </td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Type </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['customertype'];?>
                                    </td>
                                  </tr>
								  <tr>
                                    <td height="27" valign="bottom" class="simpletxt">&nbsp;Assigned To </td>
                                    <td height="27" colspan="2" valign="bottom" class="simpletxt"><?=$getData['fullname'];?>
                                    </td>
                                  </tr>
								  <tr>
									<td height="27" valign="bottom" class="simpletxt">&nbsp;Account Number </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<? if($getData['accountnumber']!=0){echo $getData['accountnumber'];}?>      
									</td>
							      </tr>
								   <tr>
									<td height="27" valign="bottom" class="simpletxt">&nbsp;Special Needs </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=$getData['specialneeds'];?>       
									</td>
								   </tr>
								   <tr>
									<td height="27" valign="bottom" class="simpletxt">&nbsp;Alert </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=$getData['alert'];?>       
									</td>
								   </tr>
								   <tr>
									<td height="27" valign="bottom" class="simpletxt">&nbsp;Referred By </td>
									<td height="27" colspan="2" valign="bottom" class="simpletxt">
										<?=$getData['refferedby'];?>       
									</td>
								   </tr>
                                  <tr>
                                    <td colspan="3" align="center" valign="middle" class="smallText"><input name="Submit" type="submit" class="button" value="  Update  " />
                                      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                                      <input name="reset" type="reset" class="button" value="  Reset  " />
                                    </td>
                                  </tr>
                                </table>
                              </form></td>
                                  </tr>
                                </table>
                              <table border="0" cellspacing="0" cellpadding="0" align="center" class="box_width_cont product">
                                  <tr>
                                    <td></td>
                                  </tr>
                              </table></td>
                          </tr>
                        </table>
						
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td><img src="images/1_q4.gif" border="0" alt="" width="10" height="10"></td>
								<td style="width:100%; background-image:url(images/1_li1.gif)"></td>
								<td><img src="images/1_q3.gif" border="0" alt="" width="10" height="10"></td>
							</tr>
						</table>
						


		
		
		</td>

    <td class="col_right">

<table border="0"cellspacing="0" cellpadding="0" class="box_width_right">
	<tr><td></td>
		<td width="100%">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr><td></td></tr>
			</table>
		</td>
	</tr>
</table>


    </td>
  </tr>
</table>



		</td>
	</tr>
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" border="0" style="height:98px; background-image:url(images/bot.gif)">
				<tr>
					<td>
						<table cellpadding="0" cellspacing="0" border="0" class="footer">
							<tr>									
								<td height="77"><img src="images/spacer.gif" border="0" alt="" width="25" height="1"></td>				
								<td style="width:207px"><br style="line-height:49px"><img src="images/p1.gif" border="0" alt="" width="145" height="24"><br></td>
							  <td style="width:532px">&nbsp;</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table></td></tr></table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"></td>
  </tr>
</table>
</body>

</html>